package top.guagua.core.util;


import java.io.Serializable;
import java.util.List;

/**
 * 通用返回列表
 * @author wesley
 */
public class BaseResponseList<T> implements Serializable {

	/**
	 *
	 */
	private static final long serialVersionUID = 1L;

	private String msg = "";

	private String code = "00";

	private List<T> data;
	private Integer cnt;

	public BaseResponseList() {
		super();
	}

	public BaseResponseList(List<T> result) {
		super();
		this.data = result;
	}

	public BaseResponseList(String message, String code, List<T> result) {
		super();
		this.msg = message;
		this.code = code;
		this.data = result;
	}
	
	public String getMessage() {
		return msg;
	}

	public void setMessage(String message) {
		this.msg = message;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public List<T> getResult() {
		return data;
	}

	public void setResult(List<T> result) {
		this.data = result;
	}

	public Integer getCnt() {
		return cnt;
	}

	public void setCnt(Integer cnt) {
		this.cnt = cnt;
	}

	@Override
	public String toString() {
		return "ServiceResult [result=" + data + ", message=" + msg
				 + ", code=" + code + "]";
	}

}
